package com.sale.salesystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sale.salesystem.entity.ReportData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface ReportDataMapper extends BaseMapper<ReportData> {
    @Select("SELECT DISTINCT type FROM report_data")
    List<String> getAllCategories();

    @Select("SELECT DISTINCT city FROM report_data")
    List<String> getAllCities();

    @Select("SELECT DISTINCT shop_code FROM report_data")
    List<Long> getAllShopCodes();

    @Select("SELECT DISTINCT sex FROM report_data")
    List<String> getAllGenders();

    @Select("SELECT DISTINCT age FROM report_data")
    List<String> getAllAgeRanges();
}